package com.aaa.whj.Controller;

import com.aaa.whj.Service.StudentService;
import com.aaa.whj.Service.UserService;
import com.aaa.whj.vo.LoginVo;
import com.aaa.whj.vo.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: whj
 * @Version 1.0
 * @Date: 2022/11/23  19:30
 */
@RestController
public class LoginController {
    @Autowired
    private UserService userService;

    @ApiOperation(value = "登录")
    @PostMapping("/login")
    public Result login(@RequestBody LoginVo loginVo){
        return userService.selectUser(loginVo);
    }
}
